package sjtu.rfid.rri.services.dataprocess;

import java.util.List;
import java.util.Map;

/**
 * This interface defines the operations of aggregator
 * 
 * @author jinghao
 * 
 */

public interface Aggregator {
	/**
	 * Return true if the data is grouped, and false if it is not.
	 * 
	 * @param dataList
	 *            a list of data which need to be grouped
	 * @return a boolean value which indicates whether the data is grouped or
	 *         not
	 * @throws DataProcessException
	 */
	public boolean doGrouping(List<Object> dataList)
			throws DataProcessException;

	/**
	 * Return the grouped data in Map
	 * 
	 * @return the grouped data in Map
	 */
	public Map<String, List<Object>> getGroupData();

	/**
	 * Return the specified grouped data in List
	 * 
	 * @param key
	 *            the key of the group
	 * @return the specified grouped data in List
	 */
	public List<Object> getGroupDatabyKey(String key);

	/**
	 * Clear the Group Data
	 */
	public void clearGroupData();
}
